usrcalib
The purpose of the usrcalib is to allow vehicle manufacturers to store some information about the vehicle, such as its production number, model, and year. These data are stored permanently, so even if the vehicle's firmware is changed, the information in the usrcalib will not be affected.
Command usrcalib [id] [data]
id | name | size | Description |
---|---|---|---|
0 | usrWelcome | 200 char | Every controller startup, this will be printed to the terminal |
1 | usrDevName | 40 char | Device name |
2 | usrDevSN | 40 char | Device serial number |
3 | usrDevId0 | int32 | Any 32-bit signed integer |
4 | usrDevId1 | int32 | Any 32-bit signed integer |
5 | usrDevId2 | int32 | Any 32-bit signed integer |
6 | usrDevId3 | int32 | Any 32-bit signed integer |
7 | usrDevId4 | int32 | Any 32-bit signed integer |
8 | usrDevId5 | int32 | Any 32-bit signed integer |
9 | usrDevId6 | int32 | Any 32-bit signed integer |
10 | usrDevId7 | int32 | Any 32-bit signed integer |
11 | usrDevId8 | int32 | Any 32-bit signed integer |
12 | usrDevId9 | int32 | Any 32-bit signed integer |
Change usrcalib value
Set usrWelcome to "Hello world!":
Run this command in the terminal:
usrcalib 0 Hello world!
Set usrDevId0 to 123:
usrcalib 3 123
Print usrcalib
Run in terminal usrcalib
to print the whole usrcalib.
To print only one value usrcalib 3
. If usrcalib is a number, its values is returned as retval.
Examples
Set welcome message
Set the welcome message:
SC-felix#>usrcalib 0 Hello world
set usr calibration index 0 to Hello ? (y/n)
Print whole usrcalib:
SC-felix#>usrcalib
0 usrWelcome 'Hello'
1 usrDevName ''
2 usrDevSN ''
3 usrDevId0 0
4 usrDevId1 0
5 usrDevId2 0
6 usrDevId3 0
7 usrDevId4 0
8 usrDevId5 0
9 usrDevId6 0
10 usrDevId7 0
11 usrDevId8 0
12 usrDevId9 0
Set and read usrcalib
If you execute usrcalib [id]
, the return value is actual value stored in usrcalib. This only works for integers types (usrDevId0-usrDevId9)
Set usrcalib "usrDevId0" to value 1234:
SC-felix#>usrcalib 3 1234
set usr calibration index 3 to 1234 ? (y/n)
Read the value:
SC-felix#>usrcalib 3
3 usrDevId0 1234
SC-felix#>vr
List of available dynamic vars:
-> retval int32 : 1234
-> ticks uint32 : 2961034
-> debuglevel uint8 : 16
-> errlevel uint8 : 17
Total 4 entries
SC-felix#>